<script type="text/javascript" language="javascript">    
    function findNis(nis,store){
        var rec= store.findRecord('nis',nis);
        return rec;
    }
    function setThbl(mTahun,mBulan){
        var strth=mTahun.toString();
        var strbl=mBulan.toString();
        if(strbl.length == 1){
            strbl='0'+strbl;
        }
        return strth+strbl;
    }
    function setDefineWriter(writername,fieldmodel){
        Ext.define(writername, {
            extend: 'Ext.data.Model',
            fields: fieldmodel
        });
    }
    function addrecord_grideditor(gridid,rowentry){
        var vGrid = Ext.getCmp(gridid);
        //        console.log(Plant);
        //        var rowentryjurnal = new Writer.EntryTHD(newrow);
        var edit = vGrid.getPlugin();
        edit.cancelEdit();
        vGrid.getStore().insert(0, rowentry);
        edit.startEdit(0, 0);
    }
    function defineTwinSiswa_windows(winname,winid,storedata,func_doubleklik){
        Ext.define(winname, {
            extend          : 'Ext.window.Window',
            title           : 'Search Siswa',
            width           : 410,
            height          : 300,
            layout          : 'fit',
            autoShow        : true,
            modal           : true,
            alias           : 'widget.search_siswa',
            id              : winid,
            items:[{
                    //            regin:'center',
                    xtype:'panel',
                    frameHeader:false,
                    //                    title: 'Pilih Akun',
                    layout: 'fit',
                    buttonAlign: 'left',
                    modal: true,
                    width: 400,
                    height: 300,
                    closeAction: 'hide',
                    plain: true,
                    items: [{
                            xtype:'grid',
                            store: storedata,
                            stripeRows: true,
                            frame: true,
                            border:true,        
                            columns: [{
                                    header: 'NIS',
                                    dataIndex: 'nis',
                                    width: 100,
                                    sortable: true			
                                    ,align:'center'
                
                                },{
                                    header: 'Nama Siswa',
                                    dataIndex: 'nama',
                                    width: 120,
                                    sortable: true         
                                },{
                                    header: 'Kelas',
                                    dataIndex: 'kd_kelas',
                                    width: 80,
                                    sortable: true   
                                    ,align:'center'
                                },{
                                    header: 'Kelas',
                                    dataIndex: 'kelas',
                                    width: 80,
                                    sortable: true   
                                    ,align:'center'
                                }],
                            tbar: {
                    
                                //                                regin:'north',
                                xtype: 'toolbar',
                                items: [{xtype: 'searchfield',
                                        store: storedata,
                                        width: 380,
                                        emptyText: 'Quick Search...'
                                    }]
                            },
                            bbar: {
                                xtype: 'pagingtoolbar',
                                pageSize: ENDPAGE,
                                store: storedata,
                                displayInfo: true
                            },
                            listeners: {
                                'itemdblclick': func_doubleklik
                            }
                        }]
                }],
            initComponent   : function(){
                this.callParent(arguments);
            }

        });
    }
    function execute_confirm(vmsg,ajax_url,ajax_params,successfunct){
        Ext.Msg.show({
            title: 'Confirm',
            msg: vmsg,
            buttons: Ext.Msg.YESNO,
            icon: Ext.Msg.QUESTION,
            fn: function(btn){
                if (btn == 'yes') {
                    Ext.Ajax.request({                                                            
                        url: '<?php echo base_url(); ?>' +ajax_url,
                        method: 'POST',
                        params: ajax_params,
                        success: successfunct,
                        failure: function(obj) {
                            var  resp = Ext.decode(obj.responseText);
                            set_message(0, resp.reason);
                            //                                                                Ext.Msg.alert('info',resp.reason);
                        }                                                            
                    });                 
                } 
            }
        });
    }    
    function execute_ajax(ajax_url,ajax_params,ajax_waitmsg,successfunct){
        Ext.Ajax.request({                                                            
            url: '<?php echo base_url(); ?>' +ajax_url,
            method: 'POST',
            params: ajax_params,
            waitMsg:ajax_waitmsg,
            success: successfunct,
            failure: function(obj) {
                var  resp = Ext.decode(obj.responseText);
                set_message(0, resp.reason);
                //                                                                Ext.Msg.alert('info',resp.reason);
            }                                                            
        });        
    }
</script>
<?php
if (!defined('BASEPATH'))
    exit('No direct script access allowed');

$this->load->view('transaksi/datasiswa');
$this->load->view('transaksi/biayasiswa');
$this->load->view('transaksi/potongan');
$this->load->view('transaksi/generatepiutang');
$this->load->view('transaksi/simulasi');
$this->load->view('transaksi/simulasi2');
?>
